package hotel;

public class MainApplication {
	public static void main(String[] args) {
		Database databaseIn = new Database();
		new loginWindow(databaseIn);
		populateHotelsAndOwners(databaseIn);
		populateUsers(databaseIn);

	}

	private static void populateUsers(Database databaseIn) {
		databaseIn.addUser(new User("Pule", "Kies"));
		databaseIn.addUser(new User("Brian", "Fravel"));
		databaseIn.addUser(new User("John", "Doe"));
		databaseIn.addUser(new User("asdf", "asdf"));
	}

	private static void populateHotelsAndOwners(Database databaseIn) {
		Owner o = new Owner("o", "o");
		Hotel h = new Hotel("Gypie Hotel", o, 10);
		o.addHotel(h);
		databaseIn.addOwner(o);

		Owner o2 = new Owner("owner2", "ownerpass2");
		Hotel h2 = new Hotel("Pule's Hotel", o, 10);
		o2.addHotel(h2);
		databaseIn.addOwner(o2);

		Owner o3 = new Owner("owner3", "ownerpass3");
		Hotel h3 = new Hotel("Brian's Hotel", o, 10);
		o3.addHotel(h3);
		databaseIn.addOwner(o3);
	}
}
